package cn.netjava.robo3d;

import cn.netjava.robo3d.event.ImpactCarEvent;

import com.jme.math.Vector3f;

/**
 * 事件监控线程
 * @author Administrator
 *
 */
public class EventDetector implements Runnable{

	private ImpactCarEvent impactcarevent;                 //撞车事件
	private RoboTank car;

//	//
//	public EventDetector(RoboTank car,
//			ImpactCarEvent impactcarevent){
//	        this.impactcarevent=impactcarevent;
//	        this.car=car;
//	}
//
	public void run(){
//		//监控循环
//		while(true){
//			try {
//				Thread.sleep(100);
//			} catch (InterruptedException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}
//
////			System.out.println("事件探测器启动");
//
//			if(impactcarevent.ishappen()){//如果撞墙事件发生,执行系统动作
//				car.onimpactcar(impactcarevent);
//				car.onimpactcarCore(impactcarevent);
////				while(impactcarevent.iscut()){
////					   
////					   float tempforward=impactcarevent.getdistance().dot(car.cardirection);
////					   car.speed=car.speed-0.03f*tempforward/Math.abs(tempforward);
////					   System.out.println("相交 :"+tempforward);
////				}				
//			}
//
//
////			if(){
////
////			}
////			if(){
////
////			}
//
//		}
    }
}
